<template>
	<view>
		<cu-custom bgColor="bg-red" :isBack="true">		<block slot="backText"></block>
			<block slot="content">{{detail?detail.title:'消息详情'}}</block>
		</cu-custom>
		<image :src="detail.cover" v-if="detail" mode="widthFix" class="w100"></image>
		<view class="bg-white padding" v-if="detail">
			<rich-text :nodes="detail.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "member",
		components: {},
		data() {
			return {
				id: 0,
				detail: null
			}
		},
		onLoad(options) {
			if (!options.id) {
				this.$common.showErrorModal('参数有误')
			}
			this.id = options.id
			this.getDetail()
		},
		onShow() {},
		methods: {
			getDetail() {
				this.$http
					.get('notice_index', null, null, this.id)
					.then((response) => {
						this.detail = response.data.data
					})
					.catch((response) => {
						console.log(response)
					})
			}
		},
	}
</script>

<style>
</style>
